1. Field of the Invention
This invention relates generally to the Java™ platform, and more particularly to methods and systems for implementing virtual method invocation.
2. Description of the Related Art
The sharing of runtime representation of classes can help reduce the footprint of applications written in the Java programming language, and can reduce the overhead of both bytecode interpretation and dynamic compilation. However, sharing of compiled code may make ineffective some optimizations commonly employed in object oriented languages. In particular, inline caching is an optimization that may be made ineffective when compiled code is shared. In general, inline caching names a mechanism that reduces the overhead of virtual method dispatch by specializing call sites that repeatedly dispatch to the same method of the same class type. In part, sharing degrades the efficiency of inline caching because sharing turns the inline cache that naturally does not issue a call to more than one different receiver class type into a table driven call site.
In view of the foregoing, there is a need for methods that can improve the efficiency of inline caching when code is shared across class loaders.